<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>shark::AbstractStoppingCriterion&lt; ResultSetT &gt; Class Template Reference</title>
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js"></script>
<script src="../../mlstyle.js"></script>
<link href="../css/besser.css" rel="stylesheet" type="text/css"/>
</head>
<!-- pretty cool: each body gets an id tag which is the basename of the web page  -->
<!--              and allows for page-specific CSS. this is client-side scripted, -->
<!--              so the id will not yet show up in the served source code -->
<script type="text/javascript">
    jQuery(document).ready(function () {
        var url = jQuery(location).attr('href');
        var pname = url.substr(url.lastIndexOf("/")+1, url.lastIndexOf(".")-url.lastIndexOf("/")-1);
        jQuery('#this_url').html('<strong>' + pname + '</strong>');
        jQuery('body').attr('id', pname);
    });
</script>
<body>
    <div id="shark_old">
        <div id="wrap">
            <div id="header">
                <div id="site-name"><a href="../../sphinx_pages/build/html/index.html">Shark machine learning library</a></div>
                <ul id="nav">
                    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/installation.html">Installation</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/tutorials/tutorials.html">Tutorials</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/benchmark.html">Benchmarks</a>
                    </li>
                    <li class="active">
                        <a href="classes.html">Documentation</a>
                        <ul>
                            <li class="first"></li>
                            <li><a href="../../sphinx_pages/build/html/rest_sources/quickref/quickref.html">Quick references</a></li>
                            <li><a href="classes.html">Class list</a></li>
                            <li class="last"><a href="group__shark__globals.html">Global functions</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<div id="doxywrapper">
<!--
    <div id="global_doxytitle">Doxygen<br>Documentation:</div>
-->
    <div id="navrow_wrapper">
<!-- Generated by Doxygen 1.9.8 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceshark.html">shark</a></li><li class="navelem"><a class="el" href="classshark_1_1_abstract_stopping_criterion.html">AbstractStoppingCriterion</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="classshark_1_1_abstract_stopping_criterion-members.html">List of all members</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle"><div class="title">shark::AbstractStoppingCriterion&lt; ResultSetT &gt; Class Template Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div></div>
</div><!--header-->
<div class="contents">

<p>Base class for stopping criteria of optimization algorithms.  
 <a href="classshark_1_1_abstract_stopping_criterion.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_abstract_stopping_criterion_8h_source.html">shark/Algorithms/StoppingCriteria/AbstractStoppingCriterion.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for shark::AbstractStoppingCriterion&lt; ResultSetT &gt;:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classshark_1_1_abstract_stopping_criterion__inherit__graph.png" border="0" usemap="#ashark_1_1_abstract_stopping_criterion_3_01_result_set_t_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="ashark_1_1_abstract_stopping_criterion_3_01_result_set_t_01_4_inherit__map" id="ashark_1_1_abstract_stopping_criterion_3_01_result_set_t_01_4_inherit__map">
<area shape="rect" title="Base class for stopping criteria of optimization algorithms." alt="" coords="5,136,216,177"/>
<area shape="rect" href="classshark_1_1_generalization_loss.html" title="The generalization loss calculates the relative increase of the validation error compared to the mini..." alt="" coords="274,5,447,46"/>
<area shape="poly" title=" " alt="" coords="151,125,203,90,262,57,291,44,294,49,265,61,206,95,154,129"/>
<area shape="rect" href="classshark_1_1_generalization_quotient.html" title="SStopping criterion monitoring the quotient of generalization loss and training progress." alt="" coords="264,71,457,111"/>
<area shape="poly" title=" " alt="" coords="205,129,279,109,280,115,206,134"/>
<area shape="rect" href="classshark_1_1_max_iterations.html" title="This stopping criterion stops after a fixed number of iterations." alt="" coords="290,136,431,177"/>
<area shape="poly" title=" " alt="" coords="231,154,290,154,290,159,231,159"/>
<area shape="rect" href="classshark_1_1_training_error.html" title="This stopping criterion tracks the improvement of the error function of the training error over an in..." alt="" coords="293,201,428,242"/>
<area shape="poly" title=" " alt="" coords="207,179,293,201,292,207,205,184"/>
<area shape="rect" href="classshark_1_1_training_progress.html" title="This stopping criterion tracks the improvement of the training error over an interval of iterations." alt="" coords="281,267,440,307"/>
<area shape="poly" title=" " alt="" coords="154,184,206,218,265,251,294,264,291,268,262,256,203,223,151,188"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:aa813314942f2e999ac8b9c985d001f96" id="r_aa813314942f2e999ac8b9c985d001f96"><td class="memItemLeft" align="right" valign="top">typedef ResultSetT&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_stopping_criterion.html#aa813314942f2e999ac8b9c985d001f96">ResultSet</a></td></tr>
<tr class="separator:aa813314942f2e999ac8b9c985d001f96"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a2cd08d7ec1a7627ad17ce451b8ba915c" id="r_a2cd08d7ec1a7627ad17ce451b8ba915c"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_stopping_criterion.html#a2cd08d7ec1a7627ad17ce451b8ba915c">reset</a> ()=0</td></tr>
<tr class="memdesc:a2cd08d7ec1a7627ad17ce451b8ba915c"><td class="mdescLeft">&#160;</td><td class="mdescRight">resets the internal state. call before a new trial  <br /></td></tr>
<tr class="separator:a2cd08d7ec1a7627ad17ce451b8ba915c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a74a1d1aea141cf2ad5d69e29cb90f25c" id="r_a74a1d1aea141cf2ad5d69e29cb90f25c"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_abstract_stopping_criterion.html#a74a1d1aea141cf2ad5d69e29cb90f25c">stop</a> (<a class="el" href="classshark_1_1_abstract_stopping_criterion.html#aa813314942f2e999ac8b9c985d001f96">ResultSet</a> const &amp;set)=0</td></tr>
<tr class="separator:a74a1d1aea141cf2ad5d69e29cb90f25c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;class ResultSetT&gt;<br />
class shark::AbstractStoppingCriterion&lt; ResultSetT &gt;</div><p>Base class for stopping criteria of optimization algorithms. </p>
<p>Each stopping criterion provides a stop method which takes as argument the latest result of an optimization algorithm. This result is passed as a ResultSetT, which is a template type of this interface. In actual implementations, that type will usually hold the latest objective function value reached by the optimizer on the training set, but may also additionally encapsulate a performance value reached on a validation set. The stopping criteria may then use this information to reach their characteristic decision of whether or not stopping the optimization process is indicated or not. </p>

<p class="definition">Definition at line <a class="el" href="_abstract_stopping_criterion_8h_source.html#l00051">51</a> of file <a class="el" href="_abstract_stopping_criterion_8h_source.html">AbstractStoppingCriterion.h</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="aa813314942f2e999ac8b9c985d001f96" name="aa813314942f2e999ac8b9c985d001f96"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa813314942f2e999ac8b9c985d001f96">&#9670;&#160;</a></span>ResultSet</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ResultSetT &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">typedef ResultSetT <a class="el" href="classshark_1_1_abstract_stopping_criterion.html">shark::AbstractStoppingCriterion</a>&lt; ResultSetT &gt;::ResultSet</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="_abstract_stopping_criterion_8h_source.html#l00053">53</a> of file <a class="el" href="_abstract_stopping_criterion_8h_source.html">AbstractStoppingCriterion.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a2cd08d7ec1a7627ad17ce451b8ba915c" name="a2cd08d7ec1a7627ad17ce451b8ba915c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2cd08d7ec1a7627ad17ce451b8ba915c">&#9670;&#160;</a></span>reset()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ResultSetT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual void <a class="el" href="classshark_1_1_abstract_stopping_criterion.html">shark::AbstractStoppingCriterion</a>&lt; ResultSetT &gt;::reset </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>resets the internal state. call before a new trial </p>

<p>Implemented in <a class="el" href="classshark_1_1_generalization_loss.html#a986240304b8229257327128e5a35bc61">shark::GeneralizationLoss&lt; PointType &gt;</a>, <a class="el" href="classshark_1_1_generalization_quotient.html#a9b4a09253f251d327ad61a9667a67582">shark::GeneralizationQuotient&lt; PointType &gt;</a>, <a class="el" href="classshark_1_1_max_iterations.html#ad4a33c4632a28025c848ebf0c05b63b5">shark::MaxIterations&lt; ResultSet &gt;</a>, <a class="el" href="classshark_1_1_training_error.html#a72f7fae3c19205d88603b085c83a2acb">shark::TrainingError&lt; PointType &gt;</a>, <a class="el" href="classshark_1_1_training_progress.html#a6244cca3d61f3d5ce1dee922ed9415ff">shark::TrainingProgress&lt; PointType &gt;</a>, and <a class="el" href="classshark_1_1_validated_stopping_criterion.html#ad0982fa304282a6ba5d6f8cd48cf2ef8">shark::ValidatedStoppingCriterion</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_validated_stopping_criterion.html#ad0982fa304282a6ba5d6f8cd48cf2ef8">shark::ValidatedStoppingCriterion::reset()</a>, and <a class="el" href="classshark_1_1_optimization_trainer.html#ab3cfafba31871515074323c20d501573">shark::OptimizationTrainer&lt; Model, LabelTypeT &gt;::train()</a>.</p>

</div>
</div>
<a id="a74a1d1aea141cf2ad5d69e29cb90f25c" name="a74a1d1aea141cf2ad5d69e29cb90f25c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a74a1d1aea141cf2ad5d69e29cb90f25c">&#9670;&#160;</a></span>stop()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ResultSetT &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool <a class="el" href="classshark_1_1_abstract_stopping_criterion.html">shark::AbstractStoppingCriterion</a>&lt; ResultSetT &gt;::stop </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classshark_1_1_abstract_stopping_criterion.html#aa813314942f2e999ac8b9c985d001f96">ResultSet</a> const &amp;&#160;</td>
          <td class="paramname"><em>set</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>after an iteration, updates the internal state and checks whether the algorithm should stop </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">set</td><td>the result of the current iteration </td></tr>
  </table>
  </dd>
</dl>

<p>Implemented in <a class="el" href="classshark_1_1_max_iterations.html#a3959876968fade6394247850475ad7c2">shark::MaxIterations&lt; ResultSet &gt;</a>, and <a class="el" href="classshark_1_1_validated_stopping_criterion.html#af9d9d15bbdebb8dbccc1f17a0eff4ccf">shark::ValidatedStoppingCriterion</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_validated_stopping_criterion.html#af9d9d15bbdebb8dbccc1f17a0eff4ccf">shark::ValidatedStoppingCriterion::stop()</a>, and <a class="el" href="classshark_1_1_optimization_trainer.html#ab3cfafba31871515074323c20d501573">shark::OptimizationTrainer&lt; Model, LabelTypeT &gt;::train()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/shark/Algorithms/StoppingCriteria/<a class="el" href="_abstract_stopping_criterion_8h_source.html">AbstractStoppingCriterion.h</a></li>
</ul>
</div><!-- contents -->
</div>
</body>
</html>
